package com.project.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.project.entity.CmsCapitalFlow;
import com.project.pojo.dto.CmsCapitalFlowDTO;
import com.project.pojo.dto.FundStatisticsDTO;
import com.project.pojo.model.GetCmsCapitalFlowModel;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface CmsCapitalFlowMapper extends BaseMapper<CmsCapitalFlow> {

    /**
     * 按条件分页查询资金流水
     * @param page
     * @param model
     * @return
     */
    IPage<CmsCapitalFlowDTO> getCapitalFlow(Page<CmsCapitalFlowDTO> page, @Param("model") GetCmsCapitalFlowModel model);

    /**
     * 按条件查询资金流水
     * @param model
     * @return
     */
    List<CmsCapitalFlowDTO> getCapitalFlow(@Param("model") GetCmsCapitalFlowModel model);

    /**
     * 后台统计
     * @return
     */
    FundStatisticsDTO getFundStatistics();
}